package com.lanou.projecta_163news.Welcome;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by dllo on 16/3/4.
 */
public class WelcomeAdapter extends FragmentPagerAdapter{
    private ArrayList<Fragment> welcomeData;
    private String [] tltles = {"·","·","·"};
    public WelcomeAdapter(FragmentManager fm, ArrayList<Fragment> welcomeData) {
        super(fm);
        this.welcomeData = welcomeData;
    }

    @Override
    public Fragment getItem(int position) {
        return welcomeData.get(position);
    }

    @Override
    public int getCount() {
        return welcomeData.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tltles[position];
    }
}
